﻿// -----------------------------------------------------------------------------
// Generate By Furion Tools v2.16.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;
using System.Linq;
using HOPU.OnlineSchool.Core;

namespace HOPU.OnlineSchool.Core
{
    public partial class UcenterMember : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<UcenterMember, MasterDbContextLocator>
    {
    
        public string Id { get; set; }
        public string Openid { get; set; }
        public string Mobile { get; set; }
        public string Password { get; set; }
        public string Nickname { get; set; }
        public byte? Sex { get; set; }
        public byte? Age { get; set; }
        public string Avatar { get; set; }
        public string Sign { get; set; }
        public bool IsDisabled { get; set; }
        public bool IsDeleted { get; set; }
        public DateTime GmtCreate { get; set; }
        public DateTime GmtModified { get; set; }
    
        public void Configure(EntityTypeBuilder<UcenterMember> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.ToTable("ucenter_member");

                entityBuilder.HasComment("会员表");

                entityBuilder.Property(e => e.Id)
                    .HasMaxLength(19)
                    .HasColumnName("id")
                    .IsFixedLength(true)
                    .HasComment("会员id");

                entityBuilder.Property(e => e.Age)
                    .HasColumnName("age")
                    .HasComment("年龄");

                entityBuilder.Property(e => e.Avatar)
                    .HasMaxLength(255)
                    .HasColumnName("avatar")
                    .HasComment("用户头像");

                entityBuilder.Property(e => e.GmtCreate)
                    .HasColumnName("gmt_create")
                    .HasComment("创建时间");

                entityBuilder.Property(e => e.GmtModified)
                    .HasColumnName("gmt_modified")
                    .HasComment("更新时间");

                entityBuilder.Property(e => e.IsDeleted)
                    .HasColumnName("is_deleted")
                    .HasComment("逻辑删除 1（true）已删除， 0（false）未删除");

                entityBuilder.Property(e => e.IsDisabled)
                    .HasColumnName("is_disabled")
                    .HasComment("是否禁用 1（true）已禁用，  0（false）未禁用");

                entityBuilder.Property(e => e.Mobile)
                    .HasMaxLength(11)
                    .HasColumnName("mobile")
                    .HasDefaultValueSql("''")
                    .HasComment("手机号");

                entityBuilder.Property(e => e.Nickname)
                    .HasMaxLength(50)
                    .HasColumnName("nickname")
                    .HasComment("昵称");

                entityBuilder.Property(e => e.Openid)
                    .HasMaxLength(128)
                    .HasColumnName("openid")
                    .HasComment("微信openid");

                entityBuilder.Property(e => e.Password)
                    .HasMaxLength(255)
                    .HasColumnName("password")
                    .HasComment("密码");

                entityBuilder.Property(e => e.Sex)
                    .HasColumnName("sex")
                    .HasComment("性别 1 女，2 男");

                entityBuilder.Property(e => e.Sign)
                    .HasMaxLength(100)
                    .HasColumnName("sign")
                    .HasComment("用户签名");
        }

    }
}
